import {
	createRouter,
	createWebHistory
} from "vue-router";

export default createRouter({
	history: createWebHistory(),
	routes: [{
			path: "",
			redirect: "/pagesIndex/shouYeIndex"

		},
		{
			path: "/pagesIndex",
			name: "PagesIndex",
			component: () => import("./pages/PagesIndex.vue"),
			children: [

				//登录
				{
					path: "login",
					name: "login",
					component: () => import("./pages/login.vue"),
				},

				// 注册
				{
					path: "register",
					name: "register",
					component: () => import("./pages/register.vue"),
				},
				//纯音乐
				{
					path: "yingYue",
					name: "YingYue",
					component: () => import("./pages/wanYe/YingYue.vue"),
				},
				//欧美
				{
					path: "meiGou",
					name: "MeiGou",
					component: () => import("./pages/wanYe/MeiGou.vue"),
				},
				//日韩
				{
					path: "hanYu",
					name: "HanYu",
					component: () => import("./pages/wanYe/HanYu.vue"),
				},

				//华语
				{
					path: "huaYu",
					name: "HuaYu",
					component: () => import("./pages/wanYe/HuaYu.vue"),
				},

				//首页
				{
					path: "shouYeIndex",
					name: "ShouYeIndex",
					component: () => import("./pages/wanYe/ShouYeIndex.vue"),
				},
				{
					path: "Grzx",
					name: "Grzx",
					component: () => import("./pages/wanYe/mYuser/Grzx.vue"),
					children: [{
							path: "Myzl",
							name: "Myzl",
							component: () => import("./pages/wanye/myuser/Myzl.vue"),
						},
						{
							path: "Ltzx",
							name: "Ltzx",
							component: () => import("./pages/wanye/myuser/Ltzx.vue"),
						},
						{
							path: "News",
							name: "News",
							component: () => import("./pages/wanye/myuser/News.vue"),
						},
					]
				},
				{
					path: "Gedan",
					name: "Gedan",
					component: () => import("./pages/wanye/myuser/Gedan.vue"),

				},
				// 播放器
				{
					path: "play",
					name: "MusicPlay",
					component: () => import("./pages/musicplay/MusicPlayIndex.vue"),
				},
				{
					path: "yongHu",
					name: "YongHu",
					component: () => import("./pages/wanye/yongHu/YongHu.vue"),
				children: [{
						path: "xingXi",
						name: "XingXi",
						component: () => import("./pages/wanye/yongHu/XingXi.vue"),
					},{
						path: "lunTan",
						name: "LunTan",
						component: () => import("./pages/wanye/yongHu/LunTan.vue"),
					}
					]
				}
			]
		},

		//管理员
		{
			path: "/admin",
			name: "AdminIndex",
			component: () => import("./pages/AdminIndex.vue"),
			children: [{
					path: "userMgr",
					name: "UserMgrIndex",
					component: () => import("./pages/adminPage/userMgr/Index.vue"),
				},
				{
					path: "userData",
					name: "UserData",
					component: () => import("./pages/adminPage/userMgr/UserData.vue"),
				},
				{
					path: "musicMgr",
					name: "MusicMgrIndex",
					component: () => import("./pages/adminPage/musicMgr/Index.vue"),
				},
				{
					path: "musicData",
					name: "MusicData",
					component: () => import("./pages/adminPage/musicMgr/MusicData.vue"),
				},
				{
					path: "musicrm",
					name: "MusicRm",
					component: () => import("./pages/adminPage/musicMgr/MusicRm.vue"),
				},

				{
					path: "commentMgr",
					name: "CommentMgrIndex",
					component: () => import("./pages/adminPage/commentMgr/Index.vue"),
				},
				{
					path: "checkMusic",
					name: "CheckMusic",
					component: () => import("./pages/adminPage/commentMgr/CheckMusic.vue"),
				},

			]
		},

		// 用户
		{
			path: "/user",
			name: "UserIndex",
			component: () => import("./pages/UserIndex.vue"),
			children: [

			]
		},

	],
});